import {qss} from '../util/request'
import request from '../util/request'

//获取手机验证码
export const getCode = (mobile) => {
    let url = '/api/code'
    let param = {
        mobile: mobile
    }
    return request.post(url, qss(param))
}

//验证码登录或者注册
export const postCodeLogin = (mobile, code, channelId) => {
    let url = '/api/login/mobile'
    let param = {
        mobile: mobile,
        code: code,
        channelId: channelId
    }
    return request.post(url, qss(param))
}